package com.sirdc.modules.paas.api.common;

import java.io.Serializable;
import java.util.Map;

import com.sirdc.modules.paas.api.common.util.XmlParseUtil;

/**
 * 公共请求返回类.
 * 
 * @author Qing
 * @e-mail lhq@suncco.com
 * @version v1.0
 * @copyright 2010-2015
 * @create-time 2013-9-18 下午5:34:46
 * 
 */
public class CommonResponse implements Serializable {

	private static final long serialVersionUID = 1045660845863926373L;

	/**
	 * 请求返回的状态编码.
	 */
	protected String stateCode = Constants.STATECODE;
	
	/**
	 * 请求返回的状态说明.
	 */
	protected String stateIntro = Constants.STATEINTRO;
	
	/**
	 * 解析请求返回的xml数据,保存至map中.
	 * @param xmlStr 请求返回的xml字符串.
	 * @return
	 */
	protected Map<String, String> getMapByXmlStr(String xmlStr) {
		return XmlParseUtil.parseXmlToMap(xmlStr, Constants.CHARSET);
	}

	public String getStateCode() {
		return stateCode;
	}

	public void setStateCode(String stateCode) {
		this.stateCode = stateCode;
	}

	public String getStateIntro() {
		return stateIntro;
	}

	public void setStateIntro(String stateIntro) {
		this.stateIntro = stateIntro;
	}

}
